import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Random;

public class InputGenerator {
	private static int csucsokSzama = 10;
	private static BufferedWriter bufferedWriter;
	private static FileWriter printWriter;

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		try {
			printWriter = new FileWriter("resources/generaltinput.txt");
			bufferedWriter = new BufferedWriter(printWriter);

			bufferedWriter.append("hello");

			StringBuilder out = grafGenerator();
			System.out.println("out");
			System.out.println(out.toString());
			bufferedWriter.append(out.toString());

			bufferedWriter.close();

		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public static StringBuilder grafGenerator() {
		int idotartam = idotartamGenerator();
		StringBuilder graf = new StringBuilder();

		graf.append(csucsokSzama + "\n");

		for (int i = 0; i < csucsokSzama; i++) {
			graf.append(idotartam);
			graf.append(" ");
			idotartam = idotartamGenerator();
		}

		return graf;
	}

	private static int idotartamGenerator() {
		Random generator = new Random();
		int idotartam = generator.nextInt(50) + 1;

		return idotartam;
	}
}
